package com.hxkj.dao.impl;

import com.hxkj.dao.IncrementSequenceDao;
import com.hxkj.mapper.IncrementSequenceMapper;
import com.hxkj.domain.po.IncrementSequence;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;


/**
* 数据操作实现
*
* @author: kezhijie
* @version: 1.0
* @datetime: 2018-09-03 11:05:04
*
*/
@Service("incrementSequenceDao")
public class IncrementSequenceDaoImpl implements IncrementSequenceDao {

    @Resource
    private IncrementSequenceMapper incrementSequenceMapper;

    @Override
    public IncrementSequence get(Long id) {
        return incrementSequenceMapper.selectByPrimaryKey(id);
    }

    @Override
    public List<IncrementSequence> get(IncrementSequence incrementSequence) {
        return incrementSequenceMapper.select(incrementSequence);
    }

    @Override
    public int delete(Long id) {
        return incrementSequenceMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int delete(IncrementSequence incrementSequence) {
        return incrementSequenceMapper.delete(incrementSequence);
    }

    @Override
    public int save(IncrementSequence incrementSequence) {
        return incrementSequenceMapper.insert(incrementSequence);
    }

    @Override
    public int update(IncrementSequence incrementSequence) {
        return incrementSequenceMapper.update(incrementSequence);
    }

    @Override
    public IncrementSequence getSingle(IncrementSequence incrementSequence) {
        return incrementSequenceMapper.selectSingle(incrementSequence);
    }
}
